<template>
	<view class='box'>
		<view class="cont">
			<view class="top">
				<text class="center">复制以下网址</text>
				<text class="center">到电脑浏览器打开集体后台</text>
			</view>
			<view class="url center">
				{{url}}
			</view>
			<view class="btnCopy center">
				<button type="default" class="btn" @click="copy">一键复制</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				url:"https://www.tcgz.store/firm"
			}
		},
		onLoad() {
			
		},
		methods:{
			copy(){
				uni.setClipboardData({
					data: this.url,
					success: function() {
						uni.showToast({
							title: '复制成功',
							duration: 2000,
							icon: 'none'
						});
					},
					fail: function(err) {
						uni.showToast({
							title: '复制失败',
							duration: 2000,
							icon: 'none'
						});
					}
				});
			}
		},
	}
</script>

<style lang='scss' scoped>
	.box{
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100vh;
	}
	.center{
		text-align: center;
	}
	.top{
		font-size: 35rpx;
		text{
			display: block;
		}
	}
	.url{
		color: #999999;
		margin: 40rpx 0;
		font-size: 28rpx;
	}
	.btn{
		background-color: #3994ff;
		color: #fff;
		border-radius: 100rpx;
		/* width: 50%; */
	}
</style>